<?php

/**
 * Concepto form base class.
 *
 * @package    isaac
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 12815 2008-11-09 10:43:58Z fabien $
 */
class BaseConceptoForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'                => new sfWidgetFormInputHidden(),
      'nombre'            => new sfWidgetFormInput(),
      'tipo'              => new sfWidgetFormInput(),
      'numero'            => new sfWidgetFormInput(),
      'activo'            => new sfWidgetFormInput(),
      'automatico'        => new sfWidgetFormInput(),
      'auxiliar'          => new sfWidgetFormInput(),
      'es_sac'            => new sfWidgetFormInput(),
      'formula_resultado' => new sfWidgetFormInput(),
      'formula_unidad'    => new sfWidgetFormInput(),
      'ver_unidades'      => new sfWidgetFormInput(),
      'empresa_id'        => new sfWidgetFormPropelChoice(array('model' => 'Empresa', 'add_empty' => true)),
      'created_at'        => new sfWidgetFormDateTime(),
      'updated_at'        => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'                => new sfValidatorPropelChoice(array('model' => 'Concepto', 'column' => 'id', 'required' => false)),
      'nombre'            => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'tipo'              => new sfValidatorNumber(array('required' => false)),
      'numero'            => new sfValidatorNumber(array('required' => false)),
      'activo'            => new sfValidatorInteger(array('required' => false)),
      'automatico'        => new sfValidatorInteger(array('required' => false)),
      'auxiliar'          => new sfValidatorInteger(array('required' => false)),
      'es_sac'            => new sfValidatorInteger(array('required' => false)),
      'formula_resultado' => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'formula_unidad'    => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'ver_unidades'      => new sfValidatorInteger(array('required' => false)),
      'empresa_id'        => new sfValidatorPropelChoice(array('model' => 'Empresa', 'column' => 'id', 'required' => false)),
      'created_at'        => new sfValidatorDateTime(array('required' => false)),
      'updated_at'        => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('concepto[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Concepto';
  }


}
